package com.example.fresh_fruit.controller;

import com.example.fresh_fruit.entity.Orders;
import com.example.fresh_fruit.service.OrdersService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author :飞天の鱼
 * @date : 2022/8/26 9:33
 */
@Slf4j
@RestController
@RequestMapping("/ordersController")
public class OrdersController {

    @Autowired
    private OrdersService ordersService;

    @GetMapping("/selectAll")
    public List<Orders> selectAllOrders() {
        return  ordersService.selectAll();
    }
}
